﻿<ResourceDictionary
					xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
					xmlns:riaControlsBase="clr-namespace:SBPweb.RIA.Client.Controls.Base"
					xmlns:riaControlsContent="clr-namespace:SBPweb.RIA.Client.Controls.Content"
					xmlns:riaControlsWindows="clr-namespace:SBPweb.RIA.Client.Controls.Windows" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">

    <Style TargetType="riaControlsWindows:Window">
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="TabNavigation" Value="Cycle"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Margin" Value="3,3,3,3" />
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Color="#FFA3AEB9" Offset="0"/>
                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                    <GradientStop Color="#FF718597" Offset="0.375"/>
                    <GradientStop Color="#FF617584" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="ChromeBrush">
            <Setter.Value>
                <SolidColorBrush Color="#D0FFFFFF" />
                <!--<SolidColorBrush Color="#88888888" />-->
            </Setter.Value>
        </Setter>
        <Setter Property="OverlayColor" Value="#CC000000"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="riaControlsWindows:Window">
                    <Grid x:Name="Root" Margin="0">
                        <Grid.Resources>
                            <Style x:Key="ButtonStyle" TargetType="Button">
                                <Setter Property="Background" Value="#FF1F3B53"/>
                                <Setter Property="Foreground" Value="#FF000000"/>
                                <Setter Property="Padding" Value="3"/>
                                <Setter Property="BorderThickness" Value="1"/>
                                <Setter Property="BorderBrush">
                                    <Setter.Value>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFA3AEB9" Offset="0"/>
                                            <GradientStop Color="#FF8399A9" Offset="0.375"/>
                                            <GradientStop Color="#FF718597" Offset="0.375"/>
                                            <GradientStop Color="#FF617584" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="15" Height="14" Background="#02FFFFFF" x:Name="grid">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz2" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz1" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz0" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <DoubleAnimation Duration="0" Storyboard.TargetName="X" Storyboard.TargetProperty="Opacity" To="0.95"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" Storyboard.TargetName="X" Storyboard.TargetProperty="Opacity" To="0.85"/>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz2" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz1" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz0" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" Storyboard.TargetName="X" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Path HorizontalAlignment="Center" Margin="0,-1,0,0" Width="9" Fill="#14C51900" Stretch="Fill" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" x:Name="X_Fuzz2" Stroke="#14C51900" Height="8" VerticalAlignment="Center" Opacity="1" RenderTransformOrigin="0.5,0.5" Visibility="Collapsed">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform ScaleX="1.3" ScaleY="1.3"/>
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                                <Path HorizontalAlignment="Center" Margin="0,-1,0,0" Width="9" Fill="#1EC51900" Stretch="Fill" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" x:Name="X_Fuzz1" Stroke="#1EC51900" Height="8" VerticalAlignment="Center" Opacity="1" RenderTransformOrigin="0.5,0.5" Visibility="Collapsed">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform ScaleX="1.1" ScaleY="1.1"/>
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                                <Path HorizontalAlignment="Center" Margin="0,-1,0,0" Width="9" Fill="#FFC51900" Stretch="Fill" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" x:Name="X_Fuzz0" Stroke="#FFC51900" Height="8" VerticalAlignment="Center" Opacity="1" Visibility="Collapsed"/>
                                                <Path HorizontalAlignment="Center" Margin="0,-1,0,0" Width="9" Fill="#FFFFFFFF" Stretch="Fill" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" x:Name="X" Height="8" VerticalAlignment="Center" Opacity="0.7">
                                                    <Path.Stroke>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Color="#FF313131" Offset="1"/>
                                                            <GradientStop Color="#FF8E9092" Offset="0"/>
                                                        </LinearGradientBrush>
                                                    </Path.Stroke>
                                                </Path>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <Storyboard x:Name="sbModalClose">
                                <!--<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="grdPopupRoot" Storyboard.TargetProperty="Opacity">
									<EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="0.0" />
								</DoubleAnimationUsingKeyFrames>-->
                                <ColorAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="grdPopupRoot" Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)">
                                    <EasingColorKeyFrame KeyTime="00:00:00.3" Value="#00000000" />
                                </ColorAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Name="sbModalOpen">
                                <!--<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="grdPopupRoot" Storyboard.TargetProperty="Opacity">
									<EasingDoubleKeyFrame KeyTime="00:00:00.0" Value="0.0" />
									<EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="1.0" />
								</DoubleAnimationUsingKeyFrames>-->
                                <ColorAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="grdPopupRoot" Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)">
                                    <EasingColorKeyFrame KeyTime="00:00:00.3" Value="#CC000000" />
                                </ColorAnimationUsingKeyFrames>
                            </Storyboard>
                        </Grid.Resources>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="WindowStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.5">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <PowerEase EasingMode="EaseInOut" Power="5" />
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Closed">
                                    <Storyboard x:Name="sbClose">
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="bChrome" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="bChrome" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Open">
                                    <Storyboard x:Name="sbOpen">
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="bChrome" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="bChrome" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Grid x:Name="grdBackground" Margin="-3">
                            <Grid.Background>
                                <SolidColorBrush Color="#00000000" />
                            </Grid.Background>
                        </Grid>

                        <Border x:Name="bChrome" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"
							CornerRadius="3">
                            <Border.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform x:Name="tranScale" ScaleX="1" ScaleY="1" />
                                    <SkewTransform />
                                    <RotateTransform />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Border.RenderTransform>
                            <Grid>
                                <Grid Background="{TemplateBinding ChromeBrush}">
                                    <Grid.Effect>
                                        <DropShadowEffect Color="#FF000000" Opacity="0.7" Direction="-90" BlurRadius="20" />
                                    </Grid.Effect>
                                </Grid>
                                <Grid x:Name="grdChrome">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>

                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>

                                    <Grid Grid.ColumnSpan="3" Grid.Row="0">
                                        <Grid.Background>
                                            <LinearGradientBrush EndPoint="0,1">
                                                <GradientStop Color="#00FFFFFF" Offset="0.0" />
                                                <GradientStop Color="#40FFFFFF" Offset="0.85" />
                                                <GradientStop Color="#00FFFFFF" Offset="1.0" />
                                            </LinearGradientBrush>
                                        </Grid.Background>
                                    </Grid>

                                    <Grid x:Name="grdIcon" Grid.Column="0" Grid.Row="0">
                                        <Image x:Name="imgIcon" Source="{TemplateBinding IconSource}" Margin="3,3,0,3" Width="{TemplateBinding IconWidth}" Height="{TemplateBinding IconHeight}" Stretch="Uniform" />
                                    </Grid>

                                    <Grid x:Name="grdTitle" Grid.Column="1" Grid.Row="0" Margin="5">
                                        <Grid>
                                            <TextBlock FontWeight="Bold" Foreground="#FF000000" VerticalAlignment="Center" Text="{TemplateBinding Title}">
												<TextBlock.Effect>
													<BlurEffect Radius="5" />
												</TextBlock.Effect>
                                            </TextBlock>
                                            <TextBlock FontWeight="Bold" Foreground="#FFFFFFFF" VerticalAlignment="Center" Text="{TemplateBinding Title}" />
                                        </Grid>
                                    </Grid>

                                    <Button x:Name="btnClose" Grid.Column="2" Margin="5,6,5,6" IsTabStop="False" Width="16" Height="16" Style="{StaticResource ButtonStyle}" VerticalAlignment="Top"/>

                                    <Grid x:Name="grdContent" Grid.ColumnSpan="3" Grid.Row="1" Margin="{TemplateBinding Margin}">
                                        <ContentPresenter x:Name="cpContent" Content="{TemplateBinding Content}" />
                                    </Grid>

                                    <Grid x:Name="grdResizer" Grid.ColumnSpan="3" Grid.Row="2" Cursor="SizeNWSE">
                                        <Rectangle Width="2" Height="2" Opacity="0.3" Fill="{TemplateBinding BorderBrush}" Margin="0,0,2,2" VerticalAlignment="Bottom" HorizontalAlignment="Right" />
                                        <Rectangle Width="2" Height="2" Opacity="0.3" Fill="{TemplateBinding BorderBrush}" Margin="0,0,5,2" VerticalAlignment="Bottom" HorizontalAlignment="Right" />
                                        <Rectangle Width="2" Height="2" Opacity="0.3" Fill="{TemplateBinding BorderBrush}" Margin="0,0,2,5" VerticalAlignment="Bottom" HorizontalAlignment="Right" />
                                        <Rectangle Width="2" Height="2" Opacity="0.3" Fill="{TemplateBinding BorderBrush}" Margin="0,0,8,2" VerticalAlignment="Bottom" HorizontalAlignment="Right" />
                                        <Rectangle Width="2" Height="2" Opacity="0.3" Fill="{TemplateBinding BorderBrush}" Margin="0,0,2,8" VerticalAlignment="Bottom" HorizontalAlignment="Right" />
                                        <Rectangle Width="2" Height="2" Opacity="0.3" Fill="{TemplateBinding BorderBrush}" Margin="0,0,5,5" VerticalAlignment="Bottom" HorizontalAlignment="Right" />
                                    </Grid>

                                    <StackPanel Grid.ColumnSpan="3" Grid.Row="2" Margin="-2,-1,2,1" d:LayoutOverrides="GridBox"/>
                                </Grid>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--<Style x:Key="ModalPopupGrid" TargetType="Grid">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Grid">
					<Grid x:Name="grdPopupRoot">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="PopupStates">
								<VisualStateGroup.Transitions>
									<VisualTransition GeneratedDuration="00:00:00.3">
										<VisualTransition.GeneratedEasingFunction>
											<PowerEase EasingMode="EaseInOut" Power="5" />
										</VisualTransition.GeneratedEasingFunction>
									</VisualTransition>
								</VisualStateGroup.Transitions>
								<VisualState x:Name="Closed">
									<Storyboard x:Name="sbClose">
										<ColorAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="grdPopupRoot" Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)">
											<EasingColorKeyFrame KeyTime="00:00:00" Value="#00000000"/>
										</ColorAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Open">
									<Storyboard x:Name="sbOpen">
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="grdPopupRoot" Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="#AA000000"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<ContentPresenter Content="{TemplateBinding Content}" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>-->

    <Style TargetType="riaControlsContent:ExpandableContainer">
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="#FFFFFFFF" />
            </Setter.Value>
        </Setter>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="riaControlsContent:ExpandableContainer">
                    <ScrollViewer x:Name="svTreeView" Background="{TemplateBinding Background}" Padding="0" Margin="0" BorderThickness="0"
                                  HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="ExpandStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.3">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <PowerEase EasingMode="EaseInOut" Power="5" />
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Expand">
                                    <Storyboard x:Name="sbExpand">
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="cpContent" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="cpContent" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Collapse">
                                    <Storyboard x:Name="sbCollapse">
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="cpContent" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="cpContent" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <StackPanel x:Name="Root" Margin="{TemplateBinding Margin}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <ContentPresenter x:Name="cpToggle" Grid.Column="0" Content="{TemplateBinding ToggleButton}" />
                                <ContentPresenter x:Name="cpTitle" Grid.Column="1" Content="{TemplateBinding Title}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
                            </Grid>
                            <ContentPresenter x:Name="cpContent" Content="{TemplateBinding Content}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                                <ContentPresenter.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform x:Name="tranScale" ScaleX="1" ScaleY="1" />
                                        <SkewTransform />
                                        <RotateTransform />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </ContentPresenter.RenderTransform>
                            </ContentPresenter>
                        </StackPanel>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>